@use "~/assets/styles/global/variables.scss" as variables;

.x-ripple-js__ripple-button {
  position: relative;
  overflow: hidden;
  display: block;
}

.x-ripple-js__ripple-button > span.x-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: x-ripple-animation 800ms cubic-bezier(0.17, 0.67, 0.57, 0.94) forwards;
  transition: opacity 400ms linear;
  background-color: rgba(255, 255, 255, 0.7);
  filter: blur(40px);
}

.x-ripple-js__ripple-button > span.x-ripple.x-ripple-release {
  opacity: 0;
}

@keyframes x-ripple-animation {
  to {
    transform: scale(3);
  }
}

.blur-enter-active,
.blur-leave-active {
  transition: all 0.4s;
}
.blur-enter-from,
.blur-leave-to {
  opacity: 0;
  filter: blur(1rem);
}

vite-error-overlay {
  z-index: 10000;
}
#app {
  font-family: 'noto-sans', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--title-color);
  background-color: var(--bgcolor-main);

  .progress-bar-margin {
    top: variables.$header-height - 3px !important;
  }

  .content {
    width: 100%;
    box-sizing: border-box;
  }
}
* {
  scrollbar-color: var(--theme-color) transparent;
  scrollbar-width: thin;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;

  &:focus-visible {
    outline: none;
  }

  &::selection {
    background: var(--theme-color);
    color: var(--title-color);
  }

  &::-moz-selection {
    background: var(--theme-color);
  }

  &::-webkit-scrollbar {
    height: 6px;
    width: 6px;
    background: var(--bgcolor-main);
  }

  &::-webkit-scrollbar-thumb {
    background: var(--theme-color);
    border-radius: 0;
    -webkit-border-radius: 0;
  }

  &::-webkit-scrollbar-corner {
    background: var(--bgcolor-main);
  }
}

.ripple * {
  pointer-events: none !important;
}
body.transition-all * {
  transition:
    background-color 300ms ease,
    color 300ms ease,
    opacity 300ms ease;
}
p,
h1,
h2,
h3,
h4,
h5,
h6,
a {
  margin: 0;
}
div.links,
pre.links,
span.links {
  a {
    text-decoration: none;
    color: var(--theme-color-alt);
    position: relative;
    transition:
      background-size 300ms variables.$dynamic-easing,
      color 300ms variables.$intro-easing;
    background-image: variables.$theme-color-primary-gradient;
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;

    &:hover {
      color: var(--theme-color);
      background-size: 100% 2px;
    }
  }
}
html,
body,
#__layout,
#__nuxt {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: var(--bgcolor-main);
  color: var(--title-color);
}
div,
p {
  font-family: noto-sans, Arial, sans-serif;
}

.centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

a,
button,
.selectable {
  position: relative;
  &::after {
    box-shadow: 0 0 0 2px transparent;
    transition: box-shadow 100ms linear;
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    pointer-events: none;
    user-select: none;
    z-index: +1;
    border-radius: inherit;
  }

  &:focus {
    outline: none;
    &::after {
      box-shadow: 0 0 0 2px var(--theme-color);
    }
  }
}

input:focus {
  outline: solid 2px var(--theme-color);
}

textarea:focus {
  outline: none;
}

a {
  text-decoration: none;
  color: unset;
}
.monospace {
  display: inline-block;
  background-color: #0000004d;
  padding: 2px 5px;
  font-family: monospace;
  border-radius: 4px;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  background-clip: text;
  color: var(--title-color);
  -webkit-text-fill-color: var(--title-color);
}
